package com.demo.demo_mybatis.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.demo.demo_mybatis.entity.Order;
import com.demo.demo_mybatis.mapper.OrderMapper;
import com.demo.demo_mybatis.service.IOrderService;
import io.swagger.annotations.Authorization;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author demo
 * @since 2022-03-09
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    OrderMapper orderMapper;

    @RequestMapping("/find")
    public List<Order> find() {
        QueryWrapper<Order> qw = new QueryWrapper<>();
        return orderMapper.selectList(qw);
    }


}
